<?php

use yii\helpers\Html;
use kartik\grid\GridView;
use kartik\grid\EnumColumn;

/* @var $this yii\web\View */
/* @var $searchModel fztadmin\modules\system\models\searches\ThirdPartyPlatform */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '第三方平台';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="third-party-platform-index">
    <p>
        <?php // echo Html::a('新加第三方分账系统平台', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'platform_name',
            'sys_component_id',
            [
                'label' => "创建时间",
                'value' => function($model){
                    return date("Y-m-d H:i:s", $model->created_at);
                }
            ],
//            'updated_at',
            //'deleted_at',
            //'created_by',
            //'updated_by',
            //'deleted_by',
            [
                'class' => EnumColumn::class,
                'attribute' => 'status',
                'enum' => $searchModel->getStatusDesc(),
            ],
//            [
//                'class' => 'yii\grid\ActionColumn',
//                'template' => "{update} {delete}",
//            ],
        ],
    ]); ?>


</div>
